<?php
require_once 'simpletest/unit_tester.php';
require_once 'simpletest/reporter.php';
require_once dirname(__FILE__) . '/../Controller.php';

class Components_StartingMember_UnitTest_ControllerTest extends UnitTestCase
{
	/**
	 * ＨＴＴＰリクエストなし
	 */
	public function Test1100()
	{
		$objSmarty = new Components(dirname(__FILE__), 'SMT');
		$objStamen = new Components_StartingMember_Controller('SM', '/Startingmember/regist/');
		$objSmarty->view->contents = 	$objStamen->fetch();
		$sHtml = $objSmarty->fetch('controller.tpl');
		$sOutputFilename = __DIR__ . '/logs/'  . __CLASS__ .  '_' . __FUNCTION__ . '.html';
		file_put_contents($sOutputFilename ,   $sHtml);
		return;
	}

	/**
	 * HTTPリクエスト設定反映
	 */
	public function Test1200()
	{
		$_REQUEST['P0'] = 'P0U8';
		$_REQUEST['P0U8'] = '1277792812.45';
		$_REQUEST['P1'] = 'P1U8';
		$_REQUEST['POS1'] = 'FW';
		$_REQUEST['P1U8'] = '1277792812.45';
		$objSmarty = new Components(dirname(__FILE__), 'SMT');
		$objStamen = new Components_StartingMember_Controller('SM', '/Startingmember/regist/');
		$objSmarty->view->contents = 	$objStamen->fetch();
		$sHtml = $objSmarty->fetch('controller.tpl');
		$sOutputFilename = __DIR__ . '/logs/'  . __CLASS__ .  '_' . __FUNCTION__ . '.html';
		file_put_contents($sOutputFilename ,   $sHtml);
		unset($_REQUEST['P1']);
		unset($_REQUEST['POS1']);
		unset($_REQUEST['P1U8']);
		return;
	}

	public function Test1300()
	{
		$_REQUEST['GAMEID'] = '00000';
		$objSmarty = new Components(dirname(__FILE__), 'SMT');
		$objStamen = new Components_StartingMember_Controller('SM', '/Startingmember/regist/');
		$objSmarty->view->contents = 	$objStamen->fetch();
		$sHtml = $objSmarty->fetch('controller.tpl');
		$sOutputFilename = __DIR__ . '/logs/'  . __CLASS__ .  '_' . __FUNCTION__ . '.html';
		file_put_contents($sOutputFilename ,   $sHtml);
		unset($_REQUEST['GAMEID']);
		return;
	}

}